A bootloader is computer code that is usually executed before an Operating System (OS) starts to run. Bootloader code is usually processor specific and performs several important tasks, such as facilitating memory management functions (e.g., program, erase verify flash memory).
To program a microcontroller, a programmer application running on a host device is needed that is compatible with the target device. Apart from being expensive, a programmer application might have other disadvantages, like long programming times and too many interconnections between the microcontroller and the programmer. Upgrading firmware for a shipped product can become tedious because of non-availability of a programming port. Even in laboratories, it might not be practicable to get a programmer application for each working bench, and the best solution available may be to provide microcontroller samples, which have already been programmed once with the bootloader in the program memory.